package com.gjy.liteflow.flow;

import com.yomahub.liteflow.core.NodeIfComponent;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.concurrent.ThreadLocalRandom;

/**
 * @author 宫静雨
 * @version 1.0
 * @since 2023-09-08 14:55:01
 */
@Component(value = "h")
@Slf4j
public class HCmp extends NodeIfComponent {
    @Override
    public boolean processIf() throws Exception {
        int i = ThreadLocalRandom.current().nextInt(5);
        log.info("process h {}", i);
        return i >= 3;
    }
}
